<div class="razor-admin-settings">
	<div class="row">
		<div class="col-sm-12">
			<form name="form" class="form-horizontal" role="form" novalidate>
				<div class="form-group">
					<label for="system-version" class="col-sm-3 control-label">System Version</label>
					<div class="col-sm-7">
						<span class="system-version">
							<span>{{system.version}}.{{system.milestone}}.{{system.release}}</span>
							<span class="alert alert-info" ng-hide="upgrade || noUpgrade || error">
								<i class="fa fa-refresh"></i>
								Checking version...
							</span>
							<span class="alert alert-success" ng-show="noUpgrade">
								<i class="fa fa-check"></i>
								Latest version installed.
							</span>
							<span class="alert alert-danger" ng-show="upgrade">
								<i class="fa fa-times"></i>
								Please upgrade to {{latestVersion.version}}.{{latestVersion.milestone}}.{{latestVersion.release}}.
							</span>
							<span class="alert alert-info" ng-show="error">
								<i class="fa fa-exclamation-triangle"></i>
								Cannot contact server, try again later.
							</span>
						</span>
						<button class="btn btn-warning pull-right" ng-click="upgradeVersion()" ng-show="upgrade"><i class="fa fa-gears"></i> Upgrade</button>
					</div>
					<div class="col-sm-2 error-block" ng-show="form.name.$dirty && form.name.$invalid">
						<span class="alert alert-danger alert-form" ng-show="form.name.$error.required">Required</span>
					</div>
				</div>
				<div class="form-group">
					<label for="site-name" class="col-sm-3 control-label">Site Name</label>
					<div class="col-sm-7">
						<input id="site-name" name="name" class="form-control" type="text" ng-model="site.name" placeholder="Shows in browser tab" required>
					</div>
					<div class="col-sm-2 error-block" ng-show="form.name.$dirty && form.name.$invalid">
						<span class="alert alert-danger alert-form" ng-show="form.name.$error.required">Required</span>
					</div>
				</div>
				<div class="form-group">
					<label for="google-analytics-code" class="col-sm-3 control-label">Google Analytics Code</label>
					<div class="col-sm-7">
						<input id="google-analytics-code" name="googleAnalyticsCode" class="form-control" type="text" ng-model="site.google_analytics_code" placeholder="Use google anlytics to track users">
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-7">
						<button type="submit" class="btn btn-success" ng-click="save()" ng-disabled="form.$invalid || processing">
							<i class="fa fa-check"></i> 
							Save Settings
						</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>